Method Invocation Coupling (MIC)
Description:
MIC is the (relative) number of other
classes to which a certain class sends messages.
MICnorm = nMIC/(N -1)
where N is the total number of classes defined in the project,
and nMIC the number of
classes to which messages are sent.
Viewpoints. These viewpoints
summarize the impact that coupling has
on some external attributes.
-
Maintainability.
The maintenance of a strongly coupled class
(high MIC value) is more difficult to do because of
its dependency on the classes it is coupled to.
-
Comprehensibility. A strongly coupled
class is more difficult to understand, as its
understanding implies a partial (or sometimes total)
understanding of the classes it is coupled to.
-
Error-prone and Testability. Errors in
a class is directly proportional to the number of
couplings to other classes. Consequently high coupling
has a negative impact on testability.
Observations
- The proposed definition of MIC is obviously a
normalized one. Although this has advantages, but for some
viewpoints, like maintainability, it is more important
to operate on the absolute values, i.e. the number of
classes to which it is coupled.
- For some viewpoints it might be important to
count only the couplings of the system to user-defined
classes, i.e. exclude the library classes.
Source: Ing. Radu Marinescu.
An Object Oriented Metrics Suite on Coupling.
Universitatea "Politehnica" Timisoara,
Facultatea de Automatica si Calculatoare, Departamentul
de Calculatoare si Inginerie Software.
September, 1998.